#ifndef __MARS_GRAPHICS_DIRECTIONALLIGHT_H__
#define __MARS_GRAPHICS_DIRECTIONALLIGHT_H__

#include "MarsLight.h"

namespace Graphics
{

typedef struct _ShaderDirectionalLight
{
	XMFLOAT4						Ambient;
	XMFLOAT4						Diffuse;
	XMFLOAT4						Specular;
	XMFLOAT3						Direction;
	float							Pad;
} ShaderDirectionalLight;

class DirectionalLight : public Light
{
public:
									DirectionalLight( const XMFLOAT3& direction = XMFLOAT3( 0.0f, 0.0f, 0.0f ),
													  const XMFLOAT4& ambient = XMFLOAT4( 1.0f, 1.0f, 1.0f, 1.0f ), 
													  const XMFLOAT4& diffuse = XMFLOAT4( 1.0f, 1.0f, 1.0f, 1.0f ), 
													  const XMFLOAT4& specular = XMFLOAT4( 1.0f, 1.0f, 1.0f, 1.0f ) );
	virtual							~DirectionalLight();
	
	void							SetDirection( const XMFLOAT3& direction );
	const XMFLOAT3&					GetDirection() const;

private:
	XMFLOAT3						m_direction;
};

inline DirectionalLight::DirectionalLight(const XMFLOAT3& direction,
										  const XMFLOAT4& ambient, 
										  const XMFLOAT4& diffuse, 
										  const XMFLOAT4& specular)
	: Light( Light::LT_DirectionalLight, ambient, diffuse, specular )
	, m_direction( direction )
{
}

inline DirectionalLight::~DirectionalLight()
{

}

inline void DirectionalLight::SetDirection( const XMFLOAT3& direction )
{
	m_direction = direction;
}

inline const XMFLOAT3& DirectionalLight::GetDirection() const
{
	return m_direction;
}

} // end of namespace Graphics

#endif // end of #ifndef __MARS_GRAPHICS_DIRECTIONALLIGHT_H__